package org.bambrikii.kbParser.nativeLanguages.tests;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CommonTokenStream;
import org.bambrikii.kbParser.nativelang.grammar.TLexer;
import org.bambrikii.kbParser.nativelang.grammar.TParser;
import org.junit.Test;

public class TTest2 {
	@Test
	public void mainTest1() throws IOException {
		final String[] args = new String[] { "" };
		final TLexer lex = new TLexer(new ANTLRFileStream(args[0]));
		final CommonTokenStream tokens = new CommonTokenStream(lex);

		final TParser parser = new TParser(tokens); // created from T.g
		throw new RuntimeException("Not implemented");
		/*
		TParser.startRule_return r = parser.startRule(); // launch parsing
		if (r != null) {
			System.out.println(((CommonTree) r.tree).toStringTree());
		}

		final CommonTreeNodeStream nodes = new CommonTreeNodeStream((Tree) r.tree);
		nodes.setTokenStream(tokens);
		final TP walker = new TP(nodes); // created from TP.g
		final TP.startRule_return r2 = walker.startRule();
		final CommonTree rt = ((CommonTree) r2.tree);
		// if tree parser constructs trees
		if (rt != null) {
			System.out.println(((CommonTree) r2.tree).toStringTree());
		}
		 */
	}
}
